﻿Public Class ShowError

    Public Shared Sub Show(ByVal inMsgboxTitle As String, ByVal inNameModule As String, ByVal inNameRoutine As String, ByRef Ex As Exception)
        Try
            Dim oLog As New LogErrori(My.Application.Info.DirectoryPath & "\LogErrori.txt")
            oLog.Log(inNameModule, inNameRoutine, Ex)
            oLog = Nothing

            oLog = New LogErrori(My.Computer.FileSystem.SpecialDirectories.Desktop & "\Errore Log.txt")
            oLog.Log(inNameModule, inNameRoutine, Ex)
            oLog = Nothing

        Catch ex1 As Exception
            MsgBox(Ex.Message, "ShowError")
        End Try

        Dim oFrm As New frmShowError
        oFrm.Initialize(My.Application.Info.Title, inNameModule, inNameRoutine, inMsgboxTitle & " - " & Ex.Message)
        oFrm.ShowDialog()
        oFrm = Nothing
    End Sub

End Class
